<%@ page language="java" contentType="text/html; charset=UTF-8"
    pageEncoding="UTF-8"%>
<%
	TravlogHashMap hm = RequestManager.getRequest(request);
	WebDAO wdao = new WebDAO();
	String imageRoot = "http://"+request.getServerName()+request.getContextPath()+"/upload/";
%>

<%@page import="comm.util.TravlogHashMap"%>
<%@page import="comm.util.RequestManager"%>
<%@page import="com.ssu.judea.travlog.model.TravlogDAO"%>
<%@page import="com.ssu.judea.travlog.model.WebDAO"%>
<%@page import="java.util.ArrayList"%>
<%@page import="com.ssu.judea.travlog.vo.ResultPost"%>
<div id="postBox">
	<script type="text/javascript">
			$(document).ready(function(){
				initialize();

				$("a[rel=image_group]").fancybox({
					'transitionIn'		: 'elastic',
					'transitionOut'		: 'elastic',
					'titlePosition' 	: 'over',
					'titleFormat'		: function(title, currentArray, currentIndex, currentOpts) {
						return '<span id="fancybox-title-over">Image ' + (currentIndex + 1) + ' / ' + currentArray.length + (title.length ? ' &nbsp; ' + title : '') + '</span>';
					}
				});
			});
	</script>
	<div id="map_canvas" style="width:100%; height:100%"></div>
	<% 
	ArrayList<ResultPost> list = wdao.getUserPostByDate("",hm.get("SEQ").toString(),hm.get("DATE").toString());
	%>
	<%if(list!=null && list.size()>0){ %>
		<div><%=hm.get("DATE")%></div>
		<%for(ResultPost curPost : list){ %>
			<div>
			<div class="postItems white">
				<div>
				<%if(curPost.getAttachimageurl()!=null && curPost.getAttachimageurl().length()>0){ %>
					<a rel="image_group" href="<%=imageRoot+curPost.getAttachimageurl() %>" title="<%=curPost.getContents()!=null?curPost.getContents():"#No Comments#"%>">
						<img width="200" src="<%=imageRoot+curPost.getAttachimageurl() %>"/>
					</a>
				<%}%>
				</div>
				<div>
					<%=curPost.getContents()!=null?curPost.getContents():"#No Comments#"%>
				</div>
				<div>
					<%=curPost.getRegtime() %>,
					<a href="http://maps.google.com/maps?q=<%=curPost.getLatitude()%>,<%=curPost.getLongitude()%>">Location</a>
				</div>
			</div>
			</div>
		<%} %>
	<%} %>
</div>